home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-13 / tde3.zip / TDE.DOC < prev    next >
Text File  |  1993-06-05  |  69KB  |  1,530 lines

  1.  
  2.                      TDE, the Thomson-Davis Editor
  3.                              Version 3.0
  4.                              June 5, 1993
  5.                               Frank Davis
  6.  
  7.  
  8. Description:
  9.  
  10.   TDE is a simple, public domain, multi-file/multi-window binary and text
  11.   file editor written for IBM PCs and close compatibles.  TDE is suitable
  12.   for editing batch files, binary files, text files, and various computer
  13.   language source code files.  The only limit on the number and size of
  14.   files that TDE can handle is the amount of conventional memory.
  15.   Likewise, the only limit on the number of windows is the amount of
  16.   conventional memory.  There is no preset maximum number of files or
  17.   windows that may be open at any one time.
  18.  
  19.  
  20. Introduction:
  21.  
  22.   I work with data files, computer source code, and various text files quite
  23.   a bit.  Most of the features in TDE are related, in some way, to handling
  24.   those types of files.  The various window and cursor commands in TDE are
  25.   really nice for comparing and editing source code or output files.  A
  26.   good collection of block commands is available for use on source code
  27.   and formatted data files.  For what little word processing I do, TDE has
  28.   a few simple commands for formatting text and paragraphs.  In short, TDE
  29.   contains most of the features that I use most of the time in an easy to
  30.   use, easy to remember, and easy to configure editor.  I hope you find
  31.   TDE as easy to use for most of your routine editing as me.
  32.  
  33.  
  34. Usage:
  35.  
  36.   At the command line type:
  37.  
  38.         tde [ [-f search_pattern] file name(s)]
  39.  
  40.         tde [ [-g regular_expression] file name(s)]
  41.  
  42.         tde [ [-b] file name]
  43.  
  44.   For example:
  45.  
  46.         tde
  47.         tde foo.bar
  48.         tde c:\c70\TDE\main.c
  49.         tde *.c  \qc25\TDE\*.h
  50.         tde foo.bar  foobar  f*  foo.*  f??b??
  51.  
  52.       * * *  to search files for a pattern or reg ex and load matches  * * *
  53.  
  54.         tde  -f  find_me_load_me  foo.*
  55.         tde  -f  find_me_load_me  foo.*  *.bar
  56.  
  57. new ==> tde  -g  "this|that"      foo.*      <=== finds "this" or "that"
  58.         tde  -g  [a-zA-Z0-9_]+\(  foo.bar    <=== finds C functions
  59.  
  60.         Note: If the '|' symbol is needed in a regular expression on
  61.               the command line, the search string needs to be enclosed
  62.               in quotes, or the MSDOS command interpreter will interpret '|'
  63.               as the pipe operator rather than the 'or' symbol.
  64.  
  65.       * * * to edit binary files * * *
  66.  
  67.         tde -b tde.exe
  68.         tde -b80 tde.exe
  69.  
  70.  
  71.   If you don't enter a file name on the command line, TDE will prompt you
  72.   for a file name.  If the file does not exist, TDE starts out with an
  73.   empty file with the file name you just entered.  Or, pressing <Enter>
  74.   twice will pop-up a directory list.
  75.  
  76.  
  77. What's new:
  78.  
  79.   Management policy at Simtel20 forbids encryption/decryption functions in
  80.   programs, no matter how simple.  ROT13 was taken out of version 3.0
  81.   before it was sent to Simtel20, but ROT13 is available in this version.
  82.   ROT13 is a simple encryption method, also known as a Caesar cypher.
  83.   As the name implies, Caesar cyphers have been around since the ancient
  84.   Romans.  Incidentally, Caesar used ROT3.
  85.  
  86.  
  87.                       New features in TDE 3.0 include:
  88.  
  89.                   FindRegX                 = #F7
  90.                   RepeatFindRegX           = F7
  91.                   RepeatFindRegXBackward   = @F7
  92.                   DefineRegXGrep           = ^F12
  93.                   Renamed the SearchAndSeize functions to Grep
  94.  
  95.  
  96.   The main feature in this version of TDE is a regular expression search
  97.   function.  I don't need regular expressions very often, but they do come
  98.   in handy.  For instance, our mainframe has a "compare" and a "compair"
  99.   function.  After years of using those functions, I have forgotten which
  100.   is the correct spelling.  With a regular expression function, I can
  101.   search for "comp(are|air)".  The '|' symbol, which is the or operator,
  102.   is very useful for finding several different or similar patterns at once.
  103.   Recently, I needed to delete all blank lines in a data file.  With a simple
  104.   macro, a regular expression search really simplified the job.
  105.  
  106.   Unfortunately, the regular expression search function can be very slow --
  107.   the worst case is really bad.  Searching for .*abc can take several minutes
  108.   in a small file (on a 486/33).  Press Control-Break to break-out of a long
  109.   running reg ex find.  In all actuallity, I never need to search for worst
  110.   case patterns.
  111.  
  112.  
  113.           Here's the macro I used to delete all blank lines in a file:
  114.  
  115.         Shift-F7  = FindRegX  (find a blank line before recording the macro)
  116.                     ^$
  117.  
  118.         Alt-F3    = turn macro record on
  119.         Alt-5     = assign macro to Alt-5
  120.         F7        = RepeatFindRegX - next blank line
  121.         Alt-D     = delete line
  122.         Up        = move cursor up a line (just in case current line is blank)
  123.         Alt-5     = call the macro we just recorded
  124.         Alt-F3    = turn macro record off
  125.  
  126.         Press Alt-5 to delete all blank lines.
  127.  
  128.  
  129.   The SearchAndSeize function was renamed to Grep.  I didn't want to call
  130.   the old function Grep, because that implies the ability to search for
  131.   regular expressions.  Now, there is a choice between a very fast, but
  132.   limited, DefineGrep or a slow, but very flexible, DefineRegXGrep for
  133.   greping around.
  134.  
  135.  
  136.                    Regular Expression operator precedence:
  137.                    (based on the table in Dr. Aho's book)
  138.  
  139.           ┌──────────────────────────────────────────────────────┐
  140.           │   c = char    s = string    r = regular expression   │
  141.           ├─────────┬──────────────────────────────┬─────────────┤
  142.           │  c      │  any non-operator character  │  Felis      │
  143.           │  \:c    │  predefined macro:           │  \:c*(ie|ei)│
  144.           │         │     \:a  - alphanumeric      │             │
  145.           │         │     \:b  - white space       │             │
  146.           │         │     \:c  - alphabetic        │             │
  147.           │         │     \:d  - decimal           │             │
  148.           │         │     \:h  - hex               │             │
  149.           │         │     \:l  - lower alpha       │             │
  150.           │         │     \:u  - upper alpha       │             │
  151.           │  \c     │  c literally and C escapes   │  catus\.    │
  152.           │  .      │  any character but newline   │  c.t        │
  153.           │  ^      │  beginning of line           │  ^cat       │
  154.           │  $      │  end of line                 │  cat$       │
  155.           │  [s]    │  any character in s          │  [a-z0-9]   │
  156.           │  [^s]   │  any character not in s      │  [^AEIOU]   │
  157.           │  r*     │  zero or more r's            │  ca*t       │
  158.           │  r+     │  one or more r's             │  ca[b-t]+   │
  159.           │  r?     │  zero or one r               │  c.?t       │
  160.           │  r1r2   │  r1 then r2                  │  ^$         │
  161.           │  r1|r2  │  r1 or r2                    │  kitty|cat  │
  162.           │  (r)    │  r                           │  (c)?(a+)t  │
  163.           └─────────┴──────────────────────────────┴─────────────┘
  164.  
  165.  
  166.   TDE only checks for valid syntax in a regular expression, which basically
  167.   means that parens and brackets are balanced and that consecutive operators
  168.   '*', '+', '?', and '|' are not allowed.  For example, either ^$ or $^ will
  169.   find blank lines.  TDE does not check for regular expressions that create
  170.   null loops in the pattern matching machine.  If TDE can compile a regular
  171.   expression, TDE will try to find it.  Here are some examples of good and
  172.   bad regular expressions in TDE:
  173.  
  174.             will find (good):             chokes on null loops (bad):
  175.  
  176.                 (a|b)*                            (a*|b)*
  177.                 a*(ba*)*                          (a*b*)*
  178.                 (a*b)*                            (a*b*)+
  179.                 (a+)*                             (a*)+
  180.                 a*|b                              (a?)*
  181.  
  182.   TDE will correctly compile all of the above regular expressions, but it
  183.   just can't find the "bad" regular expressions.  If TDE does choke on
  184.   null loops, a harmless "nfa choked" message is displayed in the status bar
  185.   at the bottom of the screen.  TDE never tries to predict whether a given
  186.   regular expression will produce null loops.
  187.  
  188.   Null loops are created when a regular expression has zero or more occur-
  189.   rences of zero or more occurrences, e.g. (a*)*.  The nondeterministic
  190.   finite state pattern matching machine in TDE will choke trying to find
  191.   an infinite number of zero occurrences of 'a'.
  192.  
  193.  
  194.  
  195.                       New features in TDE 2.2 include:
  196.  
  197.         Dirty Line color        = Config file
  198.         NextDirtyLine           = @F5
  199.         PrevDirtyLine           = @F6
  200.         Right margin justify    = ^F7
  201.         Stable Quicksort        = replaced the old insertion sort
  202.         Customize overscan      = config utility
  203.         Put support for two-key combo's back in, e.g. ^KQ
  204.         Edit text and binary files
  205.         + Source code may now be compiled w/ MSC 7.0, QuickC 2.51, and BC 3.1
  206.         + Make file supports MSC 7.0, QuickC 2.5, and BC 3.1
  207.         + autoload <LF>, <CRLF>, and some BIN (binary) files
  208.         + added signatures to structures changed by the config utility
  209.         + assertions in source code to find my many design flaws,
  210.             programming mistakes, and logic errors
  211.  
  212.  
  213.   In this version, the big text buffer was replaced by a double linked
  214.   list.  In general, many functions are faster.  However, this version
  215.   will not handle files quite as large as previous versions.  On the
  216.   other hand, this version will edit binary files.  I think just about
  217.   any ASCII or Extended ASCII character may be edited in any file.  Also
  218.   notice in the file header that the offset is displayed for files
  219.   opened in binary mode.
  220.  
  221.   When I added support for binary files, I wanted the ability to edit
  222.   some of the files produced by our lab equipment.  The data collectors
  223.   dump data in a fixed record size.  The record size varies among the
  224.   machines, so TDE needs to handle various fixed record formats.  The
  225.   default record length for binary files is 64.  The default record
  226.   size may be overridden on the command line with the /b switch.  Just
  227.   add the size of the desired fixed length record to the /b, e.g.
  228.  
  229.                            tde -b128 nmr.dat
  230.                            tde -b80  hplc.dat
  231.                            tde -b54  rs232.dat
  232.  
  233.   Now, whenever a line is changed, the line changes color.  The dirty
  234.   line color can be set in the config utility.  Incidentally, the dirty
  235.   line color can be set to the same color as regular text, which effectively
  236.   turns off this feature.  After using this feature for a while, I really
  237.   needed another function to move the cursor to dirty lines.  During the
  238.   day, I get interrupted quite a bit and forget what I just changed.  The
  239.   NextDirtyLine and PrevDirtyLine functions are really useful for finding
  240.   the changes I made.  Other times, I forget what I just did.  Often, I
  241.   forget what I just did five minutes ago.  I vaguely remember changing
  242.   something, but I can't remember what or where.  The NextDirtyLine and
  243.   PrevDirtyLine functions come in handy for those with bad memories, like
  244.   me.
  245.  
  246.   A minor feature was added to the word processing functions:  right margin
  247.   justification.  The SetRightMargin function asks whether or not to
  248.   justify the right margin.  In the ruler, a '<' indicates the right margin
  249.   is jagged and a '├' indicates the right margin is smooth.
  250.  
  251.   The simple insertion sort was replaced by the much faster Quicksort.  The
  252.   SortBoxBlock function works the same -- just faster.  Computer science
  253.   types seem to have a fixation on sorting and searching.
  254.  
  255.   In the DTE 5.1 editor, Doug supported the WordStar/Turbo X command
  256.   convention.  TDE now supports two-key commands in a generic way.  The first
  257.   key must be a recognized function key and the second key can be anything,
  258.   even a repeat of the first key.  The one restriction with two-key commands
  259.   is that macros cannot be assigned to two-key combo's.
  260.  
  261.   Now that I own both Microsoft C 7.0 and Borland C 3.1, the source was
  262.   changed so both compilers can compile TDE.
  263.  
  264.  
  265.                      New features in TDE 2.1 include:
  266.  
  267.         SetLtabs                = ^Tab
  268.         SetPtabs                = ^Tab, prompts for both Ltabs and Ptabs
  269.         BlockCompressTabs       = #@C
  270.         BlockIndentTabs         = #@I
  271.         ToggleTabInflate        = #@T
  272.         DefineDiff              = #F11
  273.         RepeatDiff              = F11
  274.         -f pattern files        = command line option to define grep
  275.         DefineGrep              = #F12
  276.         RepeatGrep              = F12
  277.         SwapBlock               = #@S
  278.         Sort sequence           = Config file
  279.  
  280.  
  281.                              Renamed functions:
  282.  
  283.         ReplaceString           == ReplaceForward || ReplaceBackward
  284.         PanUp                   == FixedScrollUP
  285.         PanDown                 == FixedScrollDn
  286.         PanLeft                 == ScrollLeft
  287.         PanRight                == ScrollRight
  288.  
  289.  
  290.  
  291.   At work, we may have several versions of one program.  For me, I find it
  292.   hard to remember which changes were made to which source files.  There
  293.   are several diff utilities that can point out differences, but I
  294.   probably need the edit those differences anyway.  The diff options I
  295.   find most useful are: setting the diff start, ignore leading space,
  296.   ignore all space, ignore blank lines, and ignore end of line.  The new
  297.   diff function in TDE prompts for the windows and the starting diff
  298.   options.  Once the diff is defined, press the RepeatDiff key at any time
  299.   to find the next diff.  With cursor sync turned on, it's easy to move
  300.   the cursors to begin the next diff.  Any two visible windows may be
  301.   diffed.  You may even diff windows in the same file, which is really
  302.   nice for comparing similar functions, data, or text in separate areas of
  303.   a file.
  304.  
  305.   Sort sequences were added for non-English languages: English, Esperanto,
  306.   Finnish, French, German, and Swedish.  You may customize the sort
  307.   sequence in tde.cfg.  This function is based on a program by Pierre
  308.   Jelenc, pcj1@columbia.edu.  Pierre's sort program will handle a much
  309.   wider range of alphabets and languages than TDE.
  310.  
  311.   The new SwapBlock function works only with BOX blocks.  Every once in a
  312.   while, I need to swap rows of numbers or areas of text.  The width of
  313.   the swap area assumed to be the width of the BOX.
  314.  
  315.  
  316.                    New features in TDE 2.0e include:
  317.  
  318.                       BlockRot13           = #@<
  319.                       BlockFixUUE          = #@>
  320.                       BlockEmailReply      = #@?
  321.  
  322.   ROT13 is an informal, voluntary standard used on the networks to send
  323.   text that some may consider inappropriate.  ROT13 is a convenient way
  324.   that allows one to choose whether or not to read the material.  To read
  325.   the material, one has to make a conscious and deliberate effort to
  326.   convert the text into a readable form.  ROT13 is also used to hide
  327.   answers to questions, puzzles, etc...  BlockRot13 alternately converts
  328.   ROT13 alpha characters into normal text and hides normal alpha
  329.   characters in ROT13.
  330.  
  331.   The most common default for sending large binary files across network
  332.   nodes and gateways uses UUencoding; however, some characters in the
  333.   UUencode set do not make the trip correctly.  On IBM mainframes, the
  334.   EBCDIC to ASCII translation don't do right.  Although I don't fully
  335.   understand why, but, three characters need to be fixed when receiving
  336.   text e-mail files, which include UUencoded files, from IBM mainframes.
  337.   BlockFixUUE will fix the three characters in a marked block.  The three
  338.   characters that need to be fixed in text (as opposed to binary) e-mail
  339.   files received from IBM mainframes are:
  340.  
  341.                   Hex               Decimal             ASCII
  342.  
  343.        1)     5d  ==>  7c         93  ==>  124        ]  ==>  |
  344.        2)     d5  ==>  5b        223  ==>   91        ╒  ==>  [
  345.        3)     e5  ==>  5d        229  ==>   93        σ  ==>  ]
  346.  
  347.  
  348.   When sending a reply to an e-mail, it is customary to prepend any lines
  349.   from the original e-mail with the ">" character.  BlockEmailReply
  350.   prepends "> " to the original line in an e-mail and prepends ">" to all
  351.   replies to replies in a LINE block.
  352.  
  353.  
  354.  
  355.                    New features in TDE 2.0 include :
  356.  
  357.          DateTimeStamp                           = ^2 or Control-@ sign
  358.          SortBoxBlock, ascending or descending   = @S
  359.          ToggleSmartTabs                         = @Tab
  360.          Dynamic left margin for writers         = @V
  361.          Pause, useful with macros               = ^P
  362.          Recursive macros
  363.          Support for Control-Break to stop recursive macros,
  364.               sorting, search/replacing, some block operations,
  365.               formatting text or paragraph, and printing.
  366.          Support for lines as long as 1040 characters.
  367.          Improved undo buffer management.  There is now room for
  368.               the last 10 by 1040  or  130 by 80 deleted lines.
  369.          Gathered all prompts into one header file to aid translation
  370.               of prompts and documentation into other languages.
  371.          Configuration file, option 6 in tdecfg.exe.
  372.  
  373.  
  374.   The date-time stamp was added to TDE because some users talk with field
  375.   units over the phone and the event needs to be date and time stamped.
  376.   Users may customize the date to local preferences, eg MM-DD-YY or
  377.   DD-MM-YY.  The time stamp may use either 12 hour or 24 hour form.
  378.  
  379.   Every once in a while, I need to sort data, names, etc..., in some of my
  380.   files.  The SortBoxBlock function was added to sort lines according to
  381.   the keys in a box block.  The keys may be sorted ascending or
  382.   descending, while the IGNORE/MATCH toggle determines whether case is
  383.   significant.  To sort multiple columns, start the sort with the least
  384.   significant key first.
  385.  
  386.   I also wrote a handler for the Control-Break interrupt, 0x1B.  On IBM
  387.   compatible PCs, the Control-Break key generates an interrupt via
  388.   hardware.  By writing a Control-Break interrupt handler, a user can
  389.   immediately gain control of a run-a-way recursive macro, printing job,
  390.   most box block operations, expanding tabs, trimming space from line
  391.   blocks, formatting a paragraph or text, search/replace, or a sort
  392.   operation.  Although one may trap Control-C, which is a software
  393.   generated interrupt, there is no telling when the operating system will
  394.   turn control over to a Control-C handler.  One may gain immediate
  395.   control with the Control-Break key, however.
  396.  
  397.   The undo-buffer space and management was greatly enhanced.  There is now
  398.   room for over 200 deleted lines in the buffer.  Users may now get back
  399.   entire functions that may have been deleted.
  400.  
  401.   All of the prompts in TDE were gathered into one header file to aid the
  402.   translation of documentation as well as the user prompts into other
  403.   languages.  Pierre Jelenc, pcj1@columbia.edu and a member of the Foreign
  404.   Language Education Forum (FLEFO) on CompuServe, has translated the
  405.   documentation and has created configuration files for several languages.
  406.   If you need a non-English version of TDE, contact Pierre to find out if
  407.   he has a version of TDE for you.
  408.  
  409.   A configuration file was added so that users may define all function
  410.   keys, modes, and colors from a configuration file.  Users may also
  411.   define macros in the configuration file.  Those who need to assign ASCII
  412.   and Extended ASCII character to unused function keys will find this
  413.   extremely useful.  Some alphabets need letters with all kinds of accent
  414.   marks.
  415.  
  416.  
  417.                    New features in TDE 1.5 include :
  418.  
  419.                     Ruler                     = @R
  420.                     Block trim trailing       = @T
  421.                     User defined macros:
  422.                        Record macro           = @F3
  423.                        Save macros to file    = #F1
  424.                        Load macros from file  = #F3
  425.                        Clear macro buffer     = ^ESC
  426.                     Critical error handler
  427.  
  428.   If by accident you forget to put a diskette in a floppy drive and try to
  429.   save a file or if you forget to turn on the printer before printing a
  430.   block or file, a critical error occurs.  That kind of error is the
  431.   infamous Abort, Retry, Ignore thing.  A routine was written to give some
  432.   information on the kind and the location of those errors when they
  433.   occur.  The TDE critical error handler gives you all kinds of info and
  434.   then prompts you for a response.  The timeout for critical errors varies
  435.   quite a bit.  Some timeouts may take a couple of minutes.
  436.  
  437.   When I "work" at the USDA, I often need to create or massage formatted
  438.   data files.  Also, a lot of engineers and scientists at the USDA program
  439.   in FORTRAN and the source code needs to be in a certain format.  When
  440.   working with those types of files, it is really useful to have a ruler
  441.   that explicitly shows which column the cursor is in.  The new ruler in
  442.   TDE shows margins, column numbers, and a column pointer.
  443.  
  444.  
  445.  
  446.                    New features in TDE 1.4 include :
  447.  
  448.               Split screen vertically            = F8
  449.               Number box block                   = Alt+N
  450.               Directory list                     = Alt+F1
  451.  
  452.   Also added in tdecfg was a choice of cursor styles and a switch for .bak
  453.   files.  Both of those options are in the mode section of tdecfg.
  454.  
  455.  
  456.  
  457.  
  458. Editor fields and information lines:
  459.  
  460.  
  461.                                Sample TDE screen
  462.  
  463.  
  464.          ┌─── File number - each window opened to same file has same number
  465.          │ ┌─── Window letter
  466.          │ │
  467.          │ │    ┌─── Dirty file indicator - asterisk
  468.          │ │    │ ┌─── File name
  469.          │ │    │ │                    ┌──── File attributes
  470.          │ │    │ │                    │    ┌──── Total number of lines in file
  471.          │ │    │ │                    │    │    ┌─── CR, CRLF, BIN mode
  472.          │ │    │ │                    │    │    │             ┌─── line:column
  473.                                                         
  474.       ┌──────────────────────────────────────────────────────────────┐
  475.       │    The first line on the screen contains file information    │
  476.       ├──────────────────────────────────────────────────────────────┤
  477.       │........1.....     Optional ruler line    ......7........8│
  478.       ├──────────────────────────────────────────────────────────────┤
  479.       │                                                              │
  480.       │                                                              │
  481.       │                          File area                           │
  482.       │                                                              │
  483.       │                                                              │
  484.       │                                                              │
  485.       ├──────────────────────────────────────────────────────────────┤
  486.       │                 Editor modes and information                 │
  487.       └──────────────────────────────────────────────────────────────┘
  488.                                                          Insert
  489.         │   │    │    │    │    │    │     │     │   │  │    │     └─ Overwrite
  490.         │   │    │    │    │    │    │     │     │   │  │    └───── ^Z at eof?
  491.         │   │    │    │    │    │    │     │     │   │  └───── trim trailing
  492.         │   │    │    │    │    │    │     │     │   │   space at eol, T = TRUE
  493.         │   │    │    │    │    │    │     │     │   │
  494.         │   │    │    │    │    │    │     │     │   └─── character under cursor
  495.         │   │    │    │    │    │    │     │     └───── CRLF or LF at eol?
  496.         │   │    │    │    │    │    │     └───── word wrap indicator
  497.         │   │    │    │    │    │    └───── Sync cursor in all windows?
  498.         │   │    │    │    │    └───── Ignore / Match search case?
  499.         │   │    │    │    └───── Indent mode?
  500.         │   │    │    └───── Tab modes = Smart/Fixed, In/Deflate, and ptabs
  501.         │   │    └───── Available memory for editing files
  502.         │   └───── Total number of windows, including hidden windows
  503.         └───── Total number of open files
  504.  
  505.  
  506.  
  507. Multiple keys:
  508.  
  509.   I use the following abbreviated key definitions throughout this file:
  510.  
  511.                 ^ = Control       # = Shift       @ = Alt
  512.  
  513.   For example, ^F5 means press and hold the Control key and then press F5
  514.   while holding down the Control key.
  515.  
  516.  
  517. Cursor movement:
  518.  
  519.                             101 Keyboard overview
  520.  
  521.             Cursor keys                               Keypad keys
  522.         ┌─────┬─────┬─────┐                ┌───────┬───────┬───────┬───────┐
  523.         │ Ins │Home │PgUp │                │NumLock│Grey / │Grey * │Grey - │
  524.         ├─────┼─────┼─────┤                ├───────┼───────┼───────┼───────┤
  525.         │ Del │ End │PgDn │                │ Home  │  Up   │ Pg Up │ Grey  │
  526.         └─────┴─────┴─────┘                ├───────┼───────┼───────┤   +   │
  527.                                            │ Left  │Center │ Right │       │
  528.               ┌─────┐                      ├───────┼───────┼───────┼───────┤
  529.               │ Up  │                      │  End  │ Down  │ Pg Dn │ Grey  │
  530.         ┌─────┼─────┼─────┐                ├───────┴───────┼───────┤       │
  531.         │Left │Down │Right│                │     Ins       │  Del  │ Enter │
  532.         └─────┴─────┴─────┘                └───────────────┴───────┴───────┘
  533.  
  534.                                                           
  535.     If you like using these grey                   With Num Lock off,
  536.      cursor keys, these function               you can probably guess most
  537.       assignments are for you.                of these function assignments.
  538.  
  539.           Grey cursor keys                            Keypad keys
  540.  
  541.  Up     - move cursor up                    Home   - toggle col 1 & beg of line
  542.  Down   - move cursor down                 ^Home   - first line in window
  543.  Left   - move cursor left                  Pg Up  - page up
  544.  Right  - move cursor right                ^Pg Up  - goto first page in file
  545. ^Up     - scroll cursor up                  Center - move to center of window
  546. ^Down   - scroll cursor down               ^Center - line to center of window
  547. ^Left   - cursor to previous word           End    - last character in line
  548. ^Right  - cursor to next word              ^End    - last line in window
  549. @Up     - pan up                            Pg Dn  - page down
  550. @Down   - pan down                         ^Pg Dn  - goto last page in file
  551. @Left   - pan left                          Ins    - toggle insert mode
  552. @Right  - pan right                         Del    - delete character
  553. @PgUp   - horizontal page left             ^Del    - stream delete character
  554. @PgDn   - horizontal page right             Grey - - scroll screen up
  555. ^#Left  - pan left                          Grey + - scroll screen down
  556. ^#Right - pan right                        ^Grey - - pan up
  557.                                            ^Grey + - pan down
  558.                                              Enter - Insert line and move down
  559.                                             #Enter - 1st char in next line
  560.                                             ^Enter - column 1 in next line
  561.  
  562.  
  563. Function Keys:
  564.  
  565.   I tried to use some logical order when I assigned functions to the
  566.   function keys.  I use a 101 keyboard most of the time, so it should be
  567.   easy to see the logical function grouping with it.  The function keys
  568.   on a 101 keyboard are placed along the top of the keyboard.  Functions
  569.   are arranged as follows:
  570.  
  571.  
  572.         Help    File              Find/Replace            Window
  573.               Functions              &  Diff             Commands
  574.          F1  F2  F3  F4          F5  F6  F7  F8          F9  F10  F11  F12
  575.  
  576.  
  577.    F1 = Instantaneous Help
  578.  
  579.   @F1 = Directory List
  580.         List the contents of a directory or matching files.  At the
  581.         prompt, press enter to list all files in the current directory or
  582.         enter any valid subdirectory name, file name, or wild card
  583.         characters.  You don't have to put a *.* at the end of a
  584.         subdirectory name; the directory list function adds those wild
  585.         card characters to subdirectory names as a default.  A '\' is
  586.         added to the end of subdirectory names in the file list.  To list
  587.         files in other directories, just move the cursor to the desired
  588.         subdirectory name and press enter.  When you see ..\ in the
  589.         directory list, the double periods represent the parent of the
  590.         current directory.  The .\ represents the current directory.  You
  591.         may move up and down the directory tree by selecting the parent or
  592.         childrens of the current directory.
  593.  
  594.  
  595. File Functions:
  596.  
  597.    F2 = Save file
  598.         Saves all changes made to file.  Existing file is overwritten by
  599.         the new file.  It does not prompt for a new file name -
  600.         automatically assumes you want to overwrite the old file.
  601.  
  602.    F3 = Quit file
  603.         Abandons any changes made in the file and closes or kicks the file
  604.         out of the current window.  If you are editing multiple files or
  605.         have multiple windows, TDE searches for any invisible files to
  606.         display in the current window.  If no invisible windows are found,
  607.         TDE combines windows.  If this is the only file being edited, F3
  608.         quits TDE.  If you made any changes to the file, it asks you if
  609.         you want to abandon them.  You can create an invisible window when
  610.         you load in a file over the current file.  Nothing happens to the
  611.         invisible file or window - you just can't see it.
  612.  
  613.         When I added vertical windows, this routine became a LOT more
  614.         complicated.  To keep things reasonably sane, let's only close
  615.         windows that have three common edges, eg.
  616.  
  617.                         ┌──────┬──────────┐
  618.                         │      │    no    │
  619.                         │      ├─────┬────┤
  620.                         │      │yes1 │yes1│
  621.                         │  no  ├─────┴────┤
  622.                         │      │   yes2   │
  623.                         │      ├──────────┤
  624.                         │      │   yes2   │
  625.                         └──────┴──────────┘
  626.  
  627.         Windows with 'no' cannot be closed.  Windows with 'yes' can be
  628.         combined with windows that have the same yes number.
  629.  
  630.  
  631.    F4 = File (save and quit)
  632.         This function is a combination of Save and Quit (F2 & F3 above).
  633.  
  634.    #F2 = Save as
  635.         If you don't want to overwrite the original file but you want to
  636.         save the contents of the current file, you may save the file under
  637.         a different file name.  This function prompts you for a file name
  638.         to save the changes (press escape to abort).
  639.  
  640.    #F4 = Edit new file
  641.         To bring another file into the editor, use this function.  It
  642.         loads the file into the current window and previous window becomes
  643.         invisible.  You can even load several copies of the same file.  I
  644.         like this because I often need to refer back to the original
  645.         unchanged file on disk.  When I make a booboo in a file, which is
  646.         quite often, I don't necessarily want to quit and start over; I
  647.         just want to get back the part that I messed up.  It is really
  648.         easy to mark the original text in a block and copy it to the place
  649.         where I made a booboo.  Each time a file is loaded into TDE, it is
  650.         treated as a different file.
  651.  
  652.    @F2 = Set file attributes
  653.         Change the attributes of a file.  Attributes are:  A = Archive,
  654.         S = System, H = Hidden, R = Read-Only.  You can change the
  655.         attributes of a file so that read-only files can be edited.  To
  656.         edit a read-only file:  1) edit the file, 2) change the file
  657.         attributes to archive, 3) save the changes made in the file, 4)
  658.         change the file attributes back to read-only.
  659.  
  660.    @F4 = Edit next file
  661.         If you type multiple file names or type wildcard characters on the
  662.         command line, press this key to bring in the next file or the next
  663.         matching file into the editor.
  664.  
  665.    -f pattern file(s)         (Command line DefineGrep)
  666.    -g pattern file(s)         (Command line DefineRegXGrep)
  667.        or
  668.    ^F12 = DefineRegXGrep
  669.    #F12 = DefineGrep
  670.         Grep will search files for a pattern and only load those files that
  671.         contain pattern.  The command line Define Grep works a little
  672.         differently than the function key Grep.  On the command line, spaces
  673.         are interpreted by DOS as delimiters.  Therefore, the search pattern
  674.         on the command line can not have any embedded spaces.  On the other
  675.         hand, the Fkey Grep search pattern may contain most any character.
  676.  
  677.         Defining Grep also defines the search pattern.  When a file is
  678.         loaded, press RepeatFind to go to the next occurrence of pattern.
  679.         There are actually two find structures - one for the standard
  680.         search function and one for Grep.   Defining Grep also defines
  681.         the search function.  However, redefining the standard search
  682.         structure has no effect on the Grep pattern.  The Grep pattern
  683.         remains defined until another Grep redefines it.
  684.  
  685.     F12 = RepeatGrep
  686.         After Grep has been defined, press this key to search the next file
  687.         for pattern.
  688.  
  689.  
  690. Macros:
  691.  
  692.    @F3 = Macro record
  693.         This key toggles macro record off and on.  A flashing "Recording"
  694.         is displayed in the lite bar, so it shouldn't be too difficult to
  695.         tell when record is on.  This function assigns a keystroke or a
  696.         series of keystrokes to an unused function key.  Keystrokes are
  697.         played back for some prompts.  Prompts that require the user to
  698.         input a name or pattern are played back.  Prompts that require the
  699.         user to enter a choice, "Overwrite existing file (y/n)?" for
  700.         example, are not played back.
  701.  
  702.         There is room for 1024 keystrokes in the macro buffer.  There are
  703.         no restrictions on the length of a single macro.  If you want, you
  704.         may define one macro that contains 1024 keystrokes.  When TDE
  705.         terminates, all macros definitions disappear.  Macro definitions
  706.         are temporary.  If you want to reuse macros that are defined
  707.         during an editing session, they need to be saved before you exit
  708.         TDE.
  709.  
  710.                              Recursive Macros
  711.  
  712.         "Recursive" macros are supported.  Only one level of recursion is
  713.         supported in TDE.  Here's a simple example of a recursive macro:
  714.  
  715.                         Alt-F3    = turn macro record on
  716.                         Alt-5     = assign the recording to Alt-5
  717.                         Down      = move cursor down a line
  718.                         Alt-5     = call the macro we just defined
  719.                         Alt-F3    = turn macro record off
  720.  
  721.         Enter this macro and press Alt-5 to see what a recursive macro
  722.         does.  Recursive macros repeatedly execute themselves until an
  723.         error condition occurs, which usually happens when the end of file
  724.         is reached.  I often use recursive macros to delete certain lines
  725.         in a file or to rearrange the fields of a formatted data file.
  726.  
  727.         Each editor function in TDE returns a code to the macro processor
  728.         that indicates whether or not an error occurred.  Here are some
  729.         conditions that generate an error:  attempting to move the cursor
  730.         past the end of file or behind the start of the file, trying to
  731.         add too many characters in a line, attempting block operations
  732.         with no marked block, etc...
  733.  
  734.         One interesting phenomenon about recursive macros is that a macro
  735.         can be defined that never terminates.  The simplest
  736.         non-terminating macro definition in TDE is:
  737.  
  738.                   Alt-F3  = turn macro record on
  739.                   Alt-7   = assign the recording to Alt-7
  740.                   Alt-7   = call the macro we just defined
  741.                   Alt-F3  = turn macro record off
  742.  
  743.         This a+7 macro carries out no instructions.  The only thing this
  744.         macro does is call itself.  In a perfect world, this macro will
  745.         execute forever.  There are lots of ways to create non-terminating
  746.         recursive macros.  Be creative and try creating a few non-
  747.         terminating recursive macros yourself.  With several different
  748.         sizes and shapes of horizontal and vertical windows on the screen
  749.         and with cursor sync toggled on, you can create some really neat
  750.         macros using cursor movement keys.  If you get tired of waiting
  751.         for forever, just press Control-Break to stop any macro.
  752.  
  753.                       A Really Neat Recursive Macro
  754.  
  755.         Here's a really neat recursive macro that you might try with
  756.         cursor sync turned off.  Edit a fairly large file, one with at
  757.         least a 1000 lines, and move the cursor to line 500 or the half
  758.         way point.  Then, split the screen into several vertical windows
  759.         with about 15 columns in each window , e.g.:
  760.  
  761.                 ┌───────┬───────┬────────┬───────┬───────┐
  762.                 │       │       │        │       │       │
  763.                 │       │       │        │       │       │
  764.                 │       │       │        │       │       │
  765.                 │       │       │ start  │       │       │
  766.                 │       │       │        │       │       │
  767.                 │       │       │        │       │       │
  768.                 │       │       │        │       │       │
  769.                 └───────┴───────┴────────┴───────┴───────┘
  770.  
  771.         With cursor sync turned off and macro record turned on, define a
  772.         macro that 1) moves the cursor down in one window, 2) goes to the
  773.         next window and moves the cursor up, 3) goes to the next window
  774.         and moves the cursor down, 4) when the cursor finally makes it
  775.         back to the starting window, make the macro recursive.  Suppose
  776.         the cursor is in the window labeled "start" in the sample screen
  777.         above.  Here's the way the keystrokes in this macro would be
  778.         recorded:
  779.  
  780.  
  781.                 Alt-F3    = turn macro record on
  782.                 Alt-8     = assign this macro to Alt-8
  783.                 Down      = move cursor down in "start" window
  784.                 F10       = next window
  785.                 Up        = move cursor up
  786.                 F10       = next window
  787.                 Down      = move cursor down
  788.                 F10       = next window
  789.                 Down      = move cursor down
  790.                 F10       = next window
  791.                 Up        = move cursor up
  792.                 F10       = next window - cursor is now in "start"
  793.                 Alt-8     = call the macro just defined. it's now recursive.
  794.                 Alt-F3    = turn macro record off
  795.  
  796.         Press Alt-8 and watch a really neat recursive macro.
  797.  
  798.  
  799.    #F1 = Save macro file
  800.         Saves all macro definitions to a file.  TDE prompts for the macro
  801.         file name.
  802.  
  803.    #F3 = Load macro file
  804.         Prompts for a search pattern or file name.  I can never remember
  805.         macro file or path names, so this function uses a file pick list.
  806.  
  807.    ^ESC = Clear macros
  808.         Resets or clears all macros.
  809.  
  810.    ^P  = Pause
  811.         When this function is part of a macro, press any key to continue
  812.         the macro or press ESC to halt or break the macro.
  813.  
  814.  
  815. Find and Search/Replace:
  816.  
  817.    TDE uses the Boyer-Moore search algorithm for finding strings.  Typically,
  818.    the longer the search pattern the faster the search.  So, if you want to
  819.    speed up searches, try searching for longer patterns, e.g. phrases.
  820.  
  821.    ^F5 = Toggle search case
  822.         You can toggle the case of the search flag at any time, even
  823.         after you define the search pattern.
  824.  
  825.    #F5 = find forward
  826.         To define the search pattern, use this function.  It prompts you
  827.         for the search pattern.  The pattern is defined, across files,
  828.         until changed.
  829.  
  830.    #F6 = find backward
  831.         Same as find forward except search backward in file.
  832.  
  833.    F5 = Repeat find forward
  834.         Once the search pattern has been defined (Shift F5 or Shift F6),
  835.         you can press this key at any time in any file to find the next
  836.         occurrence of pattern.  I decided to use two sets of functions to
  837.         perform searches.  Once I found a pattern, I might do some editing
  838.         and then find the next occurrence.  I hate to define the search
  839.         pattern over and over or set the search direction over and over.
  840.         This function does a wrap search - when it reaches the eof it
  841.         starts over at the beginning of the file.
  842.  
  843.    F6 = Repeat find backward
  844.         Like repeat find forward, you can press this key at anytime once
  845.         the search pattern has been defined.
  846.  
  847.    Repeat find forward2
  848.         Like F5 except the cursor is not repositioned to the middle of the
  849.         screen.  This function is useful when working with data files.
  850.  
  851.    Repeat find backward2
  852.         Like F6 except the cursor is not repositioned to the middle of the
  853.         screen.
  854.  
  855.    #F8 = Replace String
  856.         This function prompts you for the search pattern and the
  857.         replacement text.  It also prompts for the replace direction.  If
  858.         you want to match the search case, remember to toggle the search
  859.         flag, which can be done at any time.  You can either do prompt or
  860.         no prompt replacing.   Regardless of prompt or no prompt
  861.         replacing, this function actually moves the cursor to the pattern
  862.         and displays it on the screen and replaces the text. If you are
  863.         using TDE on a slow machine, you can see the search/replace taking
  864.         place.  I implemented the function this way because I just like to
  865.         see what the search/replace function is doing.  Press
  866.         Control-Break to stop no prompt replacing.
  867.  
  868.    #F7  = FindRegX
  869.         Prompts for regular expression to find.  Press F1 for a help table.
  870.  
  871.    F7 = RepeatFindRegX
  872.         Once a regular expression is defined, find next regular expression.
  873.  
  874.    @F7 = RepeatFindRegXBackward
  875.         Once a regular expression is defined, find previous reg ex.
  876.  
  877.  
  878. Diff Functions:
  879.  
  880.    #F11 = DefineDiff
  881.         This function initializes diff.  It prompts for the window number
  882.         and letter to diff, ignore leading space, ignore all space, ignore
  883.         blank lines, ignore case, and ignore end of line.  Any two windows
  884.         may be diffed.  Diff only requires that the windows be visible.
  885.  
  886.                                Diff prompts
  887.  
  888.       DIFF:  Enter first window number and letter (e.g. 1a) :
  889.       DIFF:  Enter next window number and letter (e.g. 2a) :
  890.       DIFF:  Start diff at (B)eginning of file or (C)urrent position? (b/c)
  891.       DIFF:  Ignore leading spaces (y/n)?
  892.       DIFF:  Ignore all space (y/n)?
  893.       DIFF:  Ignore blank lines (y/n)?
  894.       DIFF:  Ignore end of line (useful with reformatted paragraphs) (y/n)?
  895.  
  896.     F11 = RepeatDiff
  897.         Once the diff has been defined, press RepeatDiff to find the next
  898.         diff.
  899.  
  900.  
  901. Window Functions:
  902.  
  903.    F8 = Split window vertically
  904.         Splits the screen at the current cursor location.  The current
  905.         file is displayed in multiple windows.  Changes to a file are
  906.         echoed in all windows opened to the same copy of that file.  You
  907.         can also see any marked blocks in the same copy of the file in
  908.         different windows.  There has to be at least 15 columns in any
  909.         window, so the number of visible windows is limited by the display
  910.         screen.
  911.  
  912.    F9 = Split window horizontally
  913.         Splits the screen at the current cursor location.  There has to be
  914.         at least 1 text line in any window, so the number of visible
  915.         windows is limited by the display screen.
  916.  
  917.    #F9 = Resize window
  918.         Sometimes there is a need to concentrate on the contents of one
  919.         window.  Use the up and down arrow keys to adjust the current
  920.         window to desired size.  Changing the size of the top window is
  921.         not allowed.
  922.  
  923.    ^F9 = Zoom window
  924.         Makes the current window fill the whole screen.  All windows
  925.         except the current window become invisible.
  926.  
  927.    F10 = Next window
  928.         If more than one window is displayed, you can press one key to
  929.         move to the next window.
  930.  
  931.    #F10 = Previous window
  932.         Move to previous window - opposite of next window.
  933.  
  934.    ^F10 = Next Hidden Window
  935.         Displays "hidden" or "invisible" windows in the same place as the
  936.         current window.  The current window then becomes invisible.
  937.  
  938.  
  939. Block Commands:
  940.  
  941.   Block operations can be done within or between files.  Operations on
  942.   line blocks that move text are carried out on the line immediately
  943.   below the cursor.  Operations on box or stream blocks that move text
  944.   begin at the column of the cursor.  Press Control-Break to stop most Box
  945.   operations.  Nearly all Line and Stream operations happen so fast that
  946.   you can't stop them once they are started.
  947.  
  948.    @B - Mark Box Block
  949.         This key is used to mark both the beginning and ending corner of
  950.         a box block.
  951.  
  952.    @L - Mark Line Block
  953.         This key is similar to the operation of the box block, but entire
  954.         lines are marked.
  955.  
  956.    @X - Mark Stream Block
  957.         All the text between the beginning and ending column, sorta like a
  958.         stream of characters, is marked.  Useful with sentences.
  959.  
  960.    @U - Unmark Block
  961.         If you make a booboo when marking blocks, press @U to unmark the
  962.         block and start over.  After certain block operations, the block
  963.         may remain marked.
  964.  
  965.    @G - Group Delete block
  966.         Sorta self explanatory.  This function deletes the text in the
  967.         marked block.
  968.  
  969.    @M - Move block
  970.         Move the cursor to the desired location and press @M to move the
  971.         marked block.  In line mode, the text is moved to the line
  972.         immediately below the cursor.  In box and stream mode, the block
  973.         is moved to the column of the cursor.
  974.  
  975.    @C - Copy block
  976.         With line blocks, the block is copied to the line below the
  977.         cursor.  With box and stream blocks, the block is copied
  978.         beginning at the column of the cursor.  If you try to copy a
  979.         Line block within itself, the block copy starts at the first
  980.         line immediately after the marked block.
  981.  
  982.    @K - Kopy block
  983.         Same as copy block except block stays marked.  It's sorta like a
  984.         poor man's cut-and-paste buffer.
  985.  
  986.    @O - Overlay block
  987.         You can only overlay Box blocks.  The original block stays marked
  988.         after the operation.
  989.  
  990.    @F - Fill box block
  991.         Fills the marked Box block with character.  This function is
  992.         useful for filling in a column of periods for tables and such.
  993.  
  994.    @N - Number box block
  995.         TDE prompts you for the starting number, the increment, and
  996.         whether to left or right justify the numbers.  TDE only handles
  997.         integers  -  no floating point numbers are allowed.  I felt that
  998.         there were too many things involved in real numbers, eg. number
  999.         of significant places to left of decimal, to right of decimal,
  1000.         exponents, engineering form, scientific form, etc....  If you
  1001.         want real numbers, just use a combination of the number box
  1002.         and fill box functions.  Use the fill box function to make a
  1003.         column of decimals and the number box function to number the left
  1004.         and right side of the decimal.
  1005.  
  1006.    @P - Print block
  1007.         Prints the block to the PRN device.  I haven't tried redirecting
  1008.         the PRN, but it should work.  This function prompts for block or
  1009.         file to print.  Press Control-Break to stop printing.
  1010.  
  1011.    @S - Sort box block
  1012.         Lines are sorted, ascending or descending, using the contents of
  1013.         the box block as the sort keys.  The Ignore/Match toggle
  1014.         determines whether case of the keys is significant.  To sort
  1015.         multiple columns, sort the least significant column first.  Press
  1016.         Control-Break to stop.
  1017.  
  1018.   #@S - Swap block
  1019.         Swap block only works with BOX blocks.  The area to be swapped
  1020.         is assumed to be the width of the BOX block.  Make sure the
  1021.         cursor is at the top left corner of the area to swap before
  1022.         swapping.
  1023.  
  1024.    @W - Write block to file
  1025.         Writes the marked block to a file.  TDE prompts for the file
  1026.         name.
  1027.  
  1028.    @E - Block expand tabs
  1029.         Expands the tabs in the marked block, which must be a LINE block,
  1030.         using the current tab setting.  Press Control-Break to stop.
  1031.  
  1032.    @T - Block trim trailing
  1033.         Trims trailing space, if any, at the end of each line in a LINE
  1034.         block.  Press Control-Break to stop.
  1035.  
  1036.    @< - Block upper case
  1037.         Convert all lower case characters in the block to upper case.
  1038.         Our old IBM mainframe line printers can only print upper case.
  1039.  
  1040.    @> - Block lower case
  1041.         Convert all upper case characters in the block to lower case.
  1042.  
  1043.    @? - Block strip high bit
  1044.         Strip the high bit off all characters in the block.  This function
  1045.         is useful when editing files produced by WordStar.
  1046.  
  1047.    #@< - BlockRot13
  1048.         Convert all alpha characters in a block using ROT13.
  1049.  
  1050.    #@> - BlockFixUUE
  1051.         Fixes the EBCDIC to ASCII problem with text e-mail.
  1052.  
  1053.    #@? - BlockEmailReply
  1054.         Prepends the customary "> " or ">" to e-mail replies to lines in a
  1055.         LINE block.
  1056.  
  1057.  
  1058. Word Processing Commands:
  1059.  
  1060.    @V - toggle word wrap
  1061.         Toggle word wrap between off, Fixed Wrap, and Dynamic Wrap.  In
  1062.         Fixed Wrap mode, the left margin is explicitly determined by the
  1063.         left margin setting.  In Dynamic Wrap mode, the left margin is
  1064.         determined by the indentation of the current line.  Writers may
  1065.         find the Dynamic Wrap mode easier to use.  If the cursor is
  1066.         somewhere in the line, words are pushed to the next line.
  1067.  
  1068.         In TDE, other than margins, word wrap and format paragraph or
  1069.         format text have nothing to do with each other.  Word wrap is
  1070.         used to push characters or the cursor to the next line when the
  1071.         right margin is violated.  Format paragraph and format text can
  1072.         be used at any time - they do not depend on the state of the
  1073.         WordWrap flag.
  1074.  
  1075.   ^F6 - Set Left margin
  1076.         May be set to any column equal to or greater than 1 and less than
  1077.         the right margin.
  1078.  
  1079.   ^F7 - Set Right margin
  1080.         May be set to any column greater than the left margin and less
  1081.         than the maximum line length or 1040.
  1082.  
  1083.   ^F8 - Set Paragraph margin
  1084.         The paragraph margin may be set to any column less than the right
  1085.         margin.
  1086.  
  1087.   format paragraph - not currently assigned to a key
  1088.         Text is formatted from the beginning of the paragraph according
  1089.         to the current left, right, and paragraph margins.  If the cursor
  1090.         is not on the beginning line of a paragraph, TDE searches for
  1091.         start of the paragraph and formatting starts there.  The entire
  1092.         paragraph is formatted according to the margins.
  1093.  
  1094.   ^B - Format Text
  1095.         Text is formatted from the cursor onward.  This function does not
  1096.         search for the beginning of the paragraph to start the format.
  1097.  
  1098.   @F8 - Left justify
  1099.         Beginning of current line is adjusted to start at left margin
  1100.  
  1101.   @F9 - Right justify
  1102.         End of current line is adjusted so it ends at the right margin
  1103.  
  1104.  @F10 - Center justify
  1105.         Current line is centered between the left and right margins.
  1106.  
  1107.  
  1108. Tabs:
  1109.  
  1110.    Tab
  1111.         If in insert mode, insert the appropriate number of spaces for a
  1112.         tab and move the cursor left.  If in overwrite mode, just move
  1113.         the cursor left w/o inserting text.
  1114.  
  1115.   #Tab
  1116.         Move cursor to previous tab.
  1117.  
  1118.   ^Tab
  1119.         Set ptabs and ltabs.
  1120.  
  1121.   @Tab
  1122.         Toggle smart tab mode.  Smart tab positions are determined by
  1123.         looking for the first, previous, non-blank line above the cursor
  1124.         and then positioning the cursor at the beginning of the next or
  1125.         previous word from the column of the cursor.  It's useful for
  1126.         building tables and formatted data files.
  1127.  
  1128.    #@T
  1129.         Toggle TabInflate mode.  In TabInflate mode, tabs are not
  1130.         physically expanded.  Tabs are filled with space to give the
  1131.         illusion of physical expansion.
  1132.  
  1133.  
  1134. Toggles:
  1135.  
  1136.    ^F1
  1137.         Toggle cursor sync.  Only cursor movement commands are synced.
  1138.         Commands that change text are not synced.
  1139.  
  1140.    ^F2
  1141.         Toggle eol display.  A special character is displayed in the
  1142.         column of the actual new line.
  1143.  
  1144.    ^F3
  1145.         Toggle writing <CR><LF>, <LF>, or nothing at end of line.  TDE
  1146.         will read a text file with lines that end in either method;
  1147.         however, you may want to write the file in a different method.
  1148.         I think *nix systems only want a <LF> of the end of line.
  1149.  
  1150.    ^F4
  1151.         Toggle trimming trailing space at the end of line.  A 'T' is
  1152.         displayed in the bottom right of the mode line to indicate
  1153.         trailing space is trimmed.
  1154.  
  1155.    ^F5 = Toggle search or sort case
  1156.         You can toggle the case flag at any time, even after you define
  1157.         the search pattern.
  1158.  
  1159.    Ins
  1160.         Toggle between insert and overwrite mode.
  1161.  
  1162.    @I
  1163.         Toggle between indent and no indent mode.  In indent mode, TDE
  1164.         searches for the first non-blank character on previous lines and
  1165.         places the cursor on that column when a carriage return is
  1166.         pressed.  When backspacing in indent mode, TDE lines up the
  1167.         indentation with the first non-blank character of the previous
  1168.         line(s).
  1169.  
  1170.    @R - Toggle ruler
  1171.         Toggle display of ruler in all visible windows.
  1172.  
  1173.    @V - toggle word wrap
  1174.         Toggle word wrap between Off, Fixed Wrap, and Dynamic Wrap.
  1175.  
  1176.    @Z
  1177.         Toggle writing Control Z at the end of file.  Some programs may
  1178.         misbehave if a Control Z is not at the end of the file.
  1179.  
  1180.  
  1181. Other keys:
  1182.  
  1183.    Enter
  1184.         Insert a newline at the cursor.  If the cursor is in the middle of
  1185.         a line, the line is split at the cursor.  Indentation is matched
  1186.         if the editor is in the Indent mode.
  1187.  
  1188.    #Enter
  1189.         Move the cursor down a line.  The cursor is placed on the first
  1190.         non-blank character in the next line.  No lines are added to the
  1191.         file.
  1192.  
  1193.    ^Enter
  1194.         Move the cursor down a line.  The cursor is placed on column 1 in
  1195.         the next line.  No lines are added to the file.
  1196.  
  1197.    Up (arrow)
  1198.         Move cursor up.
  1199.  
  1200.    Down (arrow)
  1201.         Move cursor down.
  1202.  
  1203.    Left (arrow)
  1204.         Move cursor left.
  1205.  
  1206.    Right (arrow)
  1207.         Move cursor right.
  1208.  
  1209.    Home
  1210.         Toggles between the first non-blank character and column zero.
  1211.  
  1212.    End
  1213.         Move cursor to the end of line character.
  1214.  
  1215.    Page Up
  1216.         Move cursor up one page.
  1217.  
  1218.    Page Down
  1219.         Move cursor down one page.
  1220.  
  1221.    ^Right
  1222.         Move cursor one word right.
  1223.  
  1224.    ^Left
  1225.         Move cursor one word left.
  1226.  
  1227.    ^#Right   (Control+Shift+Right)
  1228.         Pan the screen one character to the right.
  1229.  
  1230.    ^#Left    (Control+Shift+Left)
  1231.         Pan the screen one character to the left.
  1232.                                                 
  1233.    ^Home
  1234.         Move cursor to first line on screen.
  1235.  
  1236.    ^End
  1237.         Move cursor to last line on screen.
  1238.  
  1239.    ^Page Up
  1240.         Move cursor to first page in file.
  1241.  
  1242.    ^Page Down
  1243.         Move cursor to last page in file.
  1244.  
  1245.    Zip to line
  1246.         Move to line number.  TDE prompts for line number.  Press Escape
  1247.         to abort.
  1248.  
  1249.    Center
  1250.         The cursor is moved to the center of the current window.
  1251.  
  1252.   ^Center
  1253.         The line the cursor is on is moved to the center of the current
  1254.         window.
  1255.  
  1256.    Grey -  (on the key pad) or
  1257.    ^Down
  1258.         Scroll window up with cursor staying on same line in file.
  1259.  
  1260.    Grey +  (on the key pad) or
  1261.    ^Up
  1262.         Scroll window down with cursor staying on same line in file.
  1263.  
  1264.   @Grey Up (the arrow in the cursor/control cluster) or
  1265.   ^Grey -  (grey - on keypad)
  1266.         Cursor stays on same line of the screen as the file scrolls up.
  1267.  
  1268.   @Grey Down (the arrow in the cursor/control cluster) or
  1269.   ^Grey +  (grey + on keypad)
  1270.         Cursor stays on same line of the screen as the file scrolls down.
  1271.  
  1272.   @Grey PgUp
  1273.         Horizontal page left.
  1274.  
  1275.   @Grey PgDn
  1276.         Horizontal page right.
  1277.  
  1278.    ESC - undo line
  1279.         Get back the original unchanged line.  When cursor is moved off a
  1280.         line, all changes to the file are made and there is no way to get
  1281.         back the contents of a line.
  1282.  
  1283.    Del
  1284.         Delete the character, if any, under the cursor.
  1285.  
  1286.    ^Del
  1287.         Delete the characters in the file as if they were a stream.
  1288.         Lines will be joined at the cursor and eventually every
  1289.         character in the file may be deleted.
  1290.  
  1291.    Backspace
  1292.         Delete the character to the left of the cursor and move left.  If
  1293.         the cursor is on the first column of a line, the current line is
  1294.         joined with the line above.  If in indent mode and the cursor is
  1295.         on the first non-blank character, TDE matches the indentation of
  1296.         the previous line(s).
  1297.  
  1298.    @=
  1299.         Duplicates the current line.
  1300.  
  1301.    @-
  1302.         Deletes the text from the cursor to the end of line.
  1303.  
  1304.    ^Y
  1305.         Deletes current line, cursor does not move.
  1306.  
  1307.    @D
  1308.         Deletes current line, cursor does not move (exactly same as ^Y).
  1309.  
  1310.    @Y  or  ^U
  1311.         Undelete the most recently deleted line.  The undelete buffer has
  1312.         room for 200 lines of deleted text.  If more than 200 lines are
  1313.         deleted, the oldest line(s) are pushed out before the new one is
  1314.         added.  You may press ^U repeatedly to undelete all lines in the
  1315.         buffer.
  1316.  
  1317.         Deleted lines from line delete, delete to end of line, word
  1318.         delete, join line, and backspace are stored in the undelete
  1319.         buffer.
  1320.  
  1321.    @A
  1322.         Add a blank line below cursor.
  1323.  
  1324.    ^_  or Control underline
  1325.         Split line at column of cursor.  If in indent mode, the split line
  1326.         is autoindented.
  1327.  
  1328.    @J
  1329.         Join the current line with the line below.
  1330.  
  1331.    ^]
  1332.         Paren Balance.
  1333.  
  1334.    @1 - @3
  1335.         Set a file marker.  Each file may have up to 3 markers.
  1336.  
  1337.    #@1 - #@3    (Shift+Alt+1 thru Shift+Alt+3)
  1338.         Goto a previously defined file marker.
  1339.  
  1340.  
  1341.    ^@  (Control+At sign -- not Control+Alt.  Control+At sign is the first
  1342.           character in the ASCII character set, Control+2 on many keyboards)
  1343.         Writes the current system date and time at the column of the
  1344.         cursor.  Use tdecfg to set the desired year and time format.
  1345.  
  1346.    Control-Break
  1347.         In TDE, Control-Break will stop printing, sorting,
  1348.         search/replacing, and recursive macros.
  1349.  
  1350.  
  1351.  
  1352. WordStar style commands:
  1353.  
  1354.   A limited number of WordStar style commands are implemented in TDE.  I
  1355.   have no plans, whatsoever, to implement any additional WordStar style
  1356.   commands.  This implementation may not correspond exactly to the
  1357.   WordStar command convention.  WordStar is a trademark of WordStar
  1358.   International.
  1359.  
  1360.    ^A - word left
  1361.    ^B - format text
  1362.    ^C - screen down
  1363.    ^D - character right
  1364.    ^E - line up
  1365.    ^F - word right
  1366.    ^G - delete character
  1367.    ^H - backspace
  1368.    ^I - tab
  1369.    ^J - help
  1370.    ^K - n/a
  1371.    ^L - n/a
  1372.    ^M - return (carriage control, enter)
  1373.    ^N - add line below cursor
  1374.    ^O - n/a
  1375.    ^P - n/a
  1376.    ^Q - n/a
  1377.    ^R - page up
  1378.    ^S - character left
  1379.    ^T - word delete
  1380.    ^U - undelete line
  1381.    ^V - toggle insert mode
  1382.    ^W - scroll up line
  1383.    ^X - line down
  1384.    ^Y - delete line
  1385.    ^Z - scroll line down
  1386.    ^\ - redraw screen
  1387.  
  1388.  
  1389. Editor command summary:
  1390.  
  1391.    Function                      Description
  1392.  
  1393. Help                    Display instantaneous help screen
  1394. Rturn                   Insert newline and move down while matching indentation
  1395. NextLine                Move cursor to first character in next line
  1396. BegNextLine             Move cursor to first column in next line
  1397. LineDown                Move cursor down a line
  1398. LineUp                  Move cursor up a line
  1399. CharRight               Move cursor right one character
  1400. CharLeft                Move cursor left one character
  1401. PanRight                Pan screen one character right
  1402. PanLeft                 Pan screen one character left
  1403. WordRight               Move cursor to beginning of next word
  1404. WordLeft                Move cursor to beginning of previous word
  1405. ScreenDown              Page screen down
  1406. ScreenUp                Page screen up
  1407. EndOfFile               Move to the last page in a file
  1408. TopOfFile               Move to the first page in a file
  1409. BotOfScreen             Move cursor to bottom of current window
  1410. TopOfScreen             Move cursor to top of current window
  1411. EndOfLine               Move cursor to end of line
  1412. BegOfLine               Move cursor to first character in line or column 1
  1413. JumpToLine              Move cursor to line entered by user
  1414. CenterWindow            Move cursor to center of current window
  1415. CenterLine              Move current line and cursor to center of window
  1416. HorizontalScreenRight   Page screen right
  1417. HorizontalScreenLeft    Page screen left
  1418. ScrollDnLine            Scroll screen down 1 line and cursor moves with line
  1419. ScrollUpLine            Scroll screen up 1 line and cursor moves with line
  1420. PanUp                   Scroll screen up 1 line and cursor does not move
  1421. PanDn                   Scroll screen down 1 line and cursor does not move
  1422. ToggleOverWrite         Toggle insert/overwrite mode and cursor changes shape
  1423. ToggleSmartTabs         Toggle smart tab mode on/off
  1424. ToggleIndent            Toggle indent mode on/off
  1425. ToggleWordWrap          Toggle word wrap on/off
  1426. ToggleCRLF              Toggle CRLF/LF at eol when writing file to disk
  1427. ToggleTrailing          Toggle trim trailing space at eol
  1428. ToggleZ                 Toggle writing ^Z at eof
  1429. ToggleEol               Toggle display of eol character
  1430. ToggleSync              Toggle cursor sync
  1431. ToggleRuler             Toggle ruler display
  1432. ToggleTabInflate        Toggle expanding tabs in display
  1433. SetTabs                 Set file tabs
  1434. SetLeftMargin           Set left margin
  1435. SetRightMargin          Set right margin
  1436. SetParagraphMargin      Set paragraph margin
  1437. FormatParagraph         Format the entire paragraph according to margins
  1438. FormatText              Format from the cursor line to end of paragraph
  1439. LeftJustify             Left justify a line
  1440. RightJustify            Right justify a line
  1441. CenterJustify           Center justify a line
  1442. Tab                     Move cursor to next tab and add spaces if insert mode
  1443. BackTab                 Move cursor to previous tab and delete if insert mode
  1444. ParenBalance            Match (), {}, or [] under the cursor
  1445. BackSpace               Delete previous character
  1446. DeleteChar              Delete current character, but do not join lines
  1447. StreamDeleteChar        Delete current character and join lines if at eol
  1448. DeleteLine              Delete current line
  1449. DelEndOfLine            Delete from the cursor to the eol
  1450. WordDelete              Delete from the cursor to the end of word
  1451. AddLine                 Insert a blank line under the cursor
  1452. SplitLine               Split the current line at the cursor
  1453. JoinLine                Join next line with current line at the cursor
  1454. DuplicateLine           Duplicate the current line
  1455. AbortCommand            Abort editor functions
  1456. UndoLine                Get back the original contents of a line
  1457. UndoDelete              Get back up to the last 200 lines deleted text
  1458. ToggleSearchCase        Toggle match/ignore search case or sort case
  1459. FindForward             Prompt for pattern and search forward
  1460. FindBackward            Prompt for pattern and search backward
  1461. RepeatFindForward1      Repeat find forward and adjust cursor if needed
  1462. RepeatFindForward2      Repeat find forward and do not adjust cursor
  1463. RepeatFindBackward1     Repeat find backward and adjust cursor if needed
  1464. RepeatFindBackward2     Repeat find backward and do not adjust cursor
  1465. ReplaceString           Search and replace pattern forward/backward
  1466. DefineDiff              Define starting diff options
  1467. RepeatDiff              Find the next diff
  1468. MarkBox                 Mark start or end of a box block
  1469. MarkLine                Mark start or end of a line block
  1470. MarkStream              Mark start or end of a stream block
  1471. UnMarkBlock             Unmark a block
  1472. FillBlock               Fill a box block with prompted character
  1473. NumberBlock             Fill a box block with starting number using increment
  1474. CopyBlock               Copy a block to cursor and unmark block
  1475. KopyBlock               Copy a block to cursor and leave block marked
  1476. MoveBlock               Move a block to cursor and unmark block
  1477. OverlayBlock            Overlay a box block
  1478. DeleteBlock             Delete a block
  1479. SwapBlock               Swap contents of BOX block w/ cursor
  1480. BlockToFile             Write a marked block to a file
  1481. PrintBlock              Print a block or file
  1482. BlockExpandTabs         Expand tabs in marked LINE block using tab setting
  1483. BlockCompressTabs       Compress space to tabs in LINE block
  1484. BlockIndentTabs         Compress leading space to tabs in LINE block
  1485. BlockTrimTrailing       Trim trailing space from all lines in a line block
  1486. BlockUpperCase          Convert all lower case in block to upper case
  1487. BlockLowerCase          Convert all upper case in block to lower case
  1488. BlockRot13              Rotate alpha characters by 13
  1489. BlockFixUUE             Fix the ASCII-EBCDIC translation problem
  1490. BlockEmailReply         Prepend '>' to included mail blocks
  1491. BlockStripHiBit         Strip the high bit from all characters in block
  1492. SortBoxBlock            Sort line according to keys in box block
  1493. DateTimeStamp           Insert system time and date
  1494. EditFile                Editor prompts for file to edit
  1495. DirList                 List matching files in subdirectories
  1496. File                    Save file and quit window
  1497. Save                    Save file
  1498. SaveAs                  Save file under a new file name
  1499. SetFileAttributes       Set current file attributes
  1500. EditNextFile            Edit next file on command line
  1501. DefineGrep              Initial simple pattern and search files
  1502. RepeatGrep              Search and load next file that contains pattern
  1503. RedrawScreen            Redraw the screen
  1504. SizeWindow              Change size of current window
  1505. SplitHorizontal         Split current window horizontally
  1506. SplitVertical           Split current window vertically
  1507. NextWindow              Move to next window
  1508. PreviousWindow          Move to previous window
  1509. ZoomWindow              Make current window the maximum window size
  1510. NextHiddenWindow        Switch to next hidden window
  1511. SetMark1                Set a file marker
  1512. SetMark2
  1513. SetMark3
  1514. GotoMark1               Move cursor to previously defined marker
  1515. GotoMark2
  1516. GotoMark3
  1517. RecordMacro             Record keystrokes
  1518. PlayBack                Used in config file - play back keystrokes
  1519. SaveMacro               Save macro to a file
  1520. LoadMacro               Load macro from a file
  1521. ClearAllMacros          Clear the macro buffer
  1522. Pause                   Pause a macro
  1523. Quit                    Quit current window and file and abandon changes
  1524. NextDirtyLine           Move cursor to next dirty line, if it exists.
  1525. PrevDirtyLine           Move cursor to previous dirty line, if it exists.
  1526. FindRegX                Prompt for regular expression to find
  1527. RepeatFindRegX          Find next regular expression
  1528. RepeatFindRegXBackward  Find previous regular expression
  1529. DefineRegXGrep          Initialize grep function
  1530.